package com.icw.resource.inner.module.srv;

import com.icw.resource.inner.entity.IcwArea;
import com.icw.decoupling.impl.module.GenericSrvImpl;

public class IcwAreaRestfulService extends GenericSrvImpl<IcwArea> {

	@Override
	public IcwArea save(IcwArea t) throws Exception {
		t = super.save(t);
		if (t.getParent() != null) {
			t.setCodePath("." + t.getCode() + t.getParent().getCodePath());
		} else {
			t.setCodePath("." + t.getCode() + ".");
		}
		return super.save(t);
	}
}
